﻿Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Windows
<Assembly: CommandClass(GetType(MyCommands.CommandClass))> 
Namespace MyCommands

    Public Class CommandClass


        Public Property ps As New PaletteSet("Licenta 3")

        <CommandMethod(prefix + "calcululSuprafetelor")>
        Public Sub CalcululSuprafetelorPalette()
            For i = 0 To ps.Count - 1
                If ps.Item(i).Name.ToLower = "calcululsuprafetelor" Then
                    ps.Activate(i)
                    Exit For
                End If
            Next
            ps.Visible = True
        End Sub
        <CommandMethod(prefix + "anexa1")>
        Public Sub Anexa1Palette()
            For i = 0 To ps.Count - 1
                If ps.Item(i).Name.ToLower = "anexa1" Then
                    ps.Activate(i)
                    Exit For
                End If
            Next
            ps.Visible = True
        End Sub
        <CommandMethod(prefix + "anexa2")>
        Public Sub Anexa2Palette()
            For i = 0 To ps.Count - 1
                If ps.Item(i).Name.ToLower = "anexa2" Then
                    ps.Activate(i)
                    Exit For
                End If
            Next
            ps.Visible = True
        End Sub
        <CommandMethod(prefix + "anexa3")>
        Public Sub Anexa3Palette()
            For i = 0 To ps.Count - 1
                If ps.Item(i).Name.ToLower = "anexa3" Then
                    ps.Activate(i)
                    Exit For
                End If
            Next
            ps.Visible = True
        End Sub
        <CommandMethod(prefix + "anexa5")>
        Public Sub Anexa5Palette()
            For i = 0 To ps.Count - 1
                If ps.Item(i).Name.ToLower = "anexa5" Then
                    ps.Activate(i)
                    Exit For
                End If
            Next
            ps.Visible = True
        End Sub
        <CommandMethod(prefix + "anexa11")>
        Public Sub Anexa11Palette()
            For i = 0 To ps.Count - 1
                If ps.Item(i).Name.ToLower = "anexa11" Then
                    ps.Activate(i)
                    Exit For
                End If
            Next
            ps.Visible = True
        End Sub
        <CommandMethod(prefix + "anexa16")>
        Public Sub Anexa16Palette()
            For i = 0 To ps.Count - 1
                If ps.Item(i).Name.ToLower = "anexa16" Then
                    ps.Activate(i)
                    Exit For
                End If
            Next
            ps.Visible = True
        End Sub
        <CommandMethod(prefix + "licenta3")>
        Public Sub Licenta3Palette()
            ps.Visible = True
        End Sub
        Public Sub New()
            ps.AddVisual("Anexa1", New Anexa1View, True)
            ps.AddVisual("Anexa2", New Anexa2View, True)
            ps.AddVisual("Anexa3", New Anexa3View)
            ps.AddVisual("Anexa5", New Anexa5View, True)
            ps.AddVisual("CalcululSuprafetelor", New CalcululSuprafetelorView, True)
            ps.AddVisual("Anexa11", New Anexa11View, True)
            ps.AddVisual("Anexa16", New Anexa16View, True)
            _ps.DeviceIndependentSize = New Size(400, Nothing)
        End Sub
    End Class
End Namespace